<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'MyJsp.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<jsp:include page="/scripts/common/index.html"></jsp:include>
<jsp:include page="/scripts/dhtmlx/index.html"></jsp:include>
<jsp:include page="/scripts/jquery/index.html"></jsp:include>
<jsp:include page="/scripts/bootstrap/index.html"></jsp:include>
<link rel="stylesheet" href="${basepath }style/default.css">
</head>
<script type="text/javascript">
	$(function() {
		query();
	});
	function save() {
		SN.alert.info("11111111");
		// closeWindow();
	}
	function closeWindow() {
		parent.w1.close();
	}
	function query() {
		$.ajax({
			type : 'POST' ,
			url : 'page/model/Page/query' ,
			data : getValue() ,
			dataType : "json" ,
			async : true ,
			cache : false ,
			jsonpCallback : "null" ,
			//beforeSend : function(response, status, statusText) {
			//alert(response + ":" + status + ":" + statusText);
			//} ,
			//dataFilter : function(response, status, statusText) {
			//alert(response + ":" + status + ":" + statusText);
			//} ,
			success : function(response, status, statusText) {
				console.debug(response);
				if (response.status) {
					var a = response.content.currentPageNum;
					var b = response.content.allPageNum;
					var c = response.content.allCount;
					setValue(a, b, c);
				} else {
					alert();
				}
			} ,
			error : function(response, status, statusText) {
				//alert(response + ":" + status + ":" + statusText);
			} ,
			complete : function(response, status, statusText) {
				//alert(response + ":" + status + ":" + statusText);
			}
		});
	}
</script>
<body>
	<table class="contTable">
		<tr class="firstTr">
			<td>
				<button onclick="save()" class="btn btn-primary" type="button">
					<span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>&nbsp;<span>保存</span>
				</button>
				<button onclick="closeWindow()" class="btn btn-primary" type="button">
					<span class="glyphicon glyphicon-remove-sign" aria-hidden="true"></span>&nbsp;<span>关闭</span>
				</button>
			</td>
		</tr>
		<tr style="height:auto">
			<td valign="top">
				<div style="width:100%;height:300px;overflow-y:auto;">
					<div class="blockBorder">
						<strong>基本信息</strong>
						<hr>
						<table class="tableCont">
							<tr>
								<td class="titleClass" style="">姓名：</td>
								<td class="contClass" style=""><input type="text" class="form-control"></td>
								<td class="titleClass">性别：</td>
								<td class="contClass" style=""><select class="form-control">
										<option>男</option>
										<option>女</option>
								</select></td>
							</tr>
							<tr>
								<td class="titleClass">年龄：</td>
								<td class="contClass"><input type="text" class="form-control"></td>
								<td class="titleClass">学历：</td>
								<td class="contClass"><input type="text" class="form-control"></td>
							</tr>
							<tr>
								<td class="titleClass">下拉选择树：</td>
								<td colspan="3">
									<div class="btn-group right-dropup" style="width:384px;">
										<input type="text" class="selectInput" style="height:30px;width:91%;" />
										<button type="button" class="btn btn-default dropdown-toggle" style="color:#000000;height:30px" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
											<span class="caret"></span> <span class="sr-only">Toggle Dropdown</span>
										</button>
										<ul class="dropdown-menu dropdown-menu-right" style="max-width:300px;width:300px;height:200px;">
											<li>
												<div style="width:98%;height:98%;overflow-y:auto;margin-left:2%;margin-top:2%">下拉选择树（单选/多选）</div>
											</li>
										</ul>
									</div>
								</td>
							</tr>
							<tr>
								<td class="titleClass">描述：</td>
								<td class="textareaClass" colspan="3"><textarea class="form-control" rows="3" style="width:99%"></textarea></td>
							</tr>
						</table>
					</div>
					<div class="blockBorder">
						<strong>从表信息</strong>
						<hr>
						<table class="listTableClass">
							<tr class="listContClass">
								<td>
									<div>
										<button class="btn btn-primary" id="add">
											<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> &nbsp; <span>新增</span>
										</button>
										<button class="btn btn-primary" id="update">
											<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> &nbsp; <span>修改</span>
										</button>
										<button class="btn btn-primary" id="delete">
											<span class="glyphicon glyphicon-trash" aria-hidden="true"></span> &nbsp; <span>删除</span>
										</button>
									</div>
								</td>
							</tr>
							<tr class="listTrClass">
								<td><jsp:include page="/common/grid_toolbar.jsp">
										<jsp:param value="query" name="func" />
										<jsp:param value="setValue" name="setValue" />
										<jsp:param value="getValue" name="getValue" />
										<jsp:param value="getGrid" name="getGrid" />
										<jsp:param value="true" name="isPaging" />
									</jsp:include></td>
							</tr>
						</table>
					</div>
				</div>
			</td>
		</tr>
	</table>
</body>
</html>
